package com.xbongbong.pro.statistic.pojo;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.pojo.DsAttrValuePojo;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author zcp
 * @version v1.0
 * @since v1.0
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class DataSetInfoPojo implements Serializable {
    private static final long serialVersionUID = 7369698531889340166L;
    private Long id;

    private String name;

    private String nameEn;

    private String memo;

    /**
     * 状态 0新建未设置画布，1设置画布且画布配置正确
     * @see com.xbongbong.paas.enums.bi.DataSetStatusEnum
     */
    private Integer status;

    /**
     * 数据更新时间 - 格式化为字符串“2022-5-18 19:41”
     */
    private String executeTime;

    /**
     * 编辑者权限、查看者权限，部门、角色、员工，默认创建人必有编辑、可见权限。格式:{"visibleScopeRule": {"dep": [], "role": [], "type": 2, "user": []}, "editableRule": {"dep": [], "role": [], "type": 2, "user": []}}
     * @see DataSetPermissionPojo
     */
    private JSONObject permission;

    /**
     * 画板，json对象内key为节点id，value为节点对象，格式见：https://alidocs.dingtalk.com/i/nodes/ZK0RbznqyYaWdDArnLwaW953mBE4AdDw?blockHash=l2rf95cx4z7cy0l0y6w&nav=spaces&navQuery=spaceId%3DO5pXB64OMkEoX7Zv
     * 其中节点类型根据枚举：DataSetNodeTypeEnum
     */
    private JSONObject board;

    /**
     * 创建人 - 格式化为人名
     */
    private String creatorId;
    /**
     * name首字母
     */
    private String firstPinyin;

    private Long addTime;

    private Long updateTime;

    /**
     * operate
     */
    private List<DsAttrValuePojo> operate;
}
